#!/usr/bin/perl 
use DBI;
use CGI;
use TTraker;

print_header;

my $dbh;
initialize_dbi;

my $form_ref = &parse_input;
my %FORM_DATA = %$form_ref; 
my $num = $FORM_DATA{'empNum'};
my $name = $FORM_DATA{'empName'};
my $job = $FORM_DATA{'jobId'};
my $loc = $FORM_DATA{'empLoc'};

my $sent_from = $ENV{'REMOTE_ADDR'};

my $now = get_local_time($loc);

pause_current_job ($num, $now);

continue_hold_job ($job, $now);

end_system_time ($num, "ALL", $now);
update_system_elapsed_time ($num );

log_in_screen_from_pm();


open (LOG, ">> $log")
		or die "CAN NOT OPEN $log";	
print LOG "$now,$sent_from,trak_04_continue_job.pl,$num,$name,$job\n";
close LOG;

db_disconnect();

##################### SUBROUTINES FOLLOW  #####################


sub trak_04_emp_log_in

{
print <<ENDHEADER;

<html>
<head>
<link rel="stylesheet" type="text/css" href="${css_ref}trak.css" />
<script type="text/javascript" src="${js_ref}trak.js"></script>
<title>trak_01_emp_num.html NO NUM</title>
</head>
<body onload="startTime()">
<h2><center>${banner}</center></h2>
<hr/>
<div id="clock"></div>
<div id="box1">
   &nbsp&nbsp&nbsp&nbsp&nbsp Employee ID: <br/><br/>
</div> 
<form id="box2" autocomplete="off" name="empID" action="${cgi_ref}trak_01_emp_log_in.pl" method="post">
   <input type="text" name=empID />&nbsp&nbsp
   <input type="submit" value="Log Into system">
</form>

</body>
</html>

ENDHEADER
}

